<template>
	<view class="content">
		<navbarVue icon="arrow-left" title="副本记录"></navbarVue>
		<view 	class="card-item" v-for="(item, index) in dataList"
				:style="{
					background: `linear-gradient(to right bottom, ${$methods.stringToColor(item.copyDesc)}, ${$methods.stringToColor(item.copyDesc)+'77'})`
				}"
		>
			<view class="title">
				<view class="title-text">
					{{ item.copyName }}
				</view>
				<view class="title-tip" :style="{
					color: $methods.stringToColor(item.copyDesc+'调色')
				}">{{ item.copyDesc }}</view>
			</view>
			<view class="flex-row-btw">
				<view class="content-item">
					<view class="p-t-4">
						
						工资：<goldVue color="#fff" :money="item.copyWages / jinBL"></goldVue></view>
					<view class="p-t-4">
						
						消费：<goldVue color="#fff" :money="item.copyUse / jinBL"></goldVue></view>
				</view>
				<view class="content-item">
					<view class="p-t-4">
						
						玄晶：{{ item.copyXuanJing }}</view>
					<view class="p-t-4">
						
						特殊：{{ item.copySpecial }}</view>
				</view>
			</view>
		</view>
		<uv-load-more 	:status="status" 
						:loading-text="loadingText" 
						:loadmore-text="loadmoreText" 
						:nomore-text="nomoreText"
						color="#1CD29B" lineColor="#1CD29B" dashed line
						/>
		<cz-safe-area-inset-bottom></cz-safe-area-inset-bottom>
	</view>
</template>

<script>
	import { jinBL } from '@/utils/const.js'
	import goldVue from '@/components/gold/gold.vue'
	import navbarVue from '@/components/navbar.vue'
	export default {
		components: {
			goldVue,
			navbarVue
		},
		data() {
			return {
				jinBL: jinBL,
				dataList: [],
				queryParams: {
					pageSize: 10,
					pageNum: 1,
				},
				status: 'loadmore',
				loadingText: '努力加载中',
				loadmoreText: '轻轻上拉',
				nomoreText: '实在没有了'
			}
		},
		mounted() {
			this.getData()
		},
		onReachBottom() {
			this.queryParams.pageNum += 1
			this.getData()
		},
		methods: {
			getData() {
				if(this.status === 'loading' || this.status === 'nomore') return
				this.status = 'loading'
				this.$api.get('/jx3/copyRecord/myList', this.queryParams).then(res => {
					this.dataList.push(...res.rows)
					this.status = this.$methods.getStatus(this.dataList.length, res.total)
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		min-height: 100vh;
		background-color: #f7f7f7;
		overflow: hidden;
	}
	.card-item {
		background-color: #fff;
		margin: 30rpx;
		padding: 30rpx;
		border-radius: 6px;
		color: #fff;
		font-weight: bold;
		position: relative;
		.title {
			padding-bottom: 10rpx;
			margin-bottom: 10prx;
			border-bottom: 1px solid #f7f7f7;
			position: relative;
			.title-text {
				text-shadow: 
					1px 1px 1px rgba(0,0,0,0.3); /* 整体外阴影，增强层次 */
			}
			.title-tip {
				position: absolute;
				right: 30rpx;
				font-size: 42px;
				bottom: 0rpx;
				z-index: 10; /* 确保描边在内容下层（或调整层级） */
				font-family: "微软雅黑", sans-serif; /* 选清晰的字体 */
				color: #d4af37; /* 基础金色，接近金属色调 */
				font-style: inherit;
				/* 多层阴影模拟立体、高光、暗部 */
				text-shadow: 
					1px 1px 0px #fff,   /* 上方/左侧高光 */
					-1px -1px 0px #996, /* 下方/右侧暗部，加深立体 */
					2px 2px 3px rgba(0,0,0,0.3); /* 整体外阴影，增强层次 */
			}
		}
		.content-item {
			width: 50%;
		}
	}
	/* 外层金色描边（伪元素实现） */
	.card-item::before {
		content: "";
		position: absolute;
		inset: -2px; /* 覆盖父元素，留出描边 */
		border: 2px solid #ffd700;
		border-radius: 20px; /* 比父元素大 2px，做出描边膨胀感 */
		box-shadow: 
			0 0 1px rgba(255, 215, 0, 0.8), /* 金色外发光，增强金属感 */
			inset 0 0 4px rgba(255, 215, 0, 0.3); /* 内发光，让描边更立体 */
		z-index: 1; /* 确保描边在内容下层（或调整层级） */
	}
</style>
